//
//  ViewController.m
//  UI05_rainbowHomework
//
//  Created by dllo on 16/6/12.
//  Copyright © 2016年 司昌宝. All rights reserved.
//

#import "ViewController.h"
#import "Rainbow.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //创建两个rainbow.
    [self creatRainbowWithFrame:CGRectMake(0, 0, 400 , 400) withCount:5];
    [self creatRainbowWithFrame:CGRectMake(100, 200, 300 , 300) withCount:6];
    
}
//创建rainbow的方法..
-(void)creatRainbowWithFrame:(CGRect)frame withCount:(NSInteger)count{
    Rainbow *rainbow = [[Rainbow alloc] initWithFrame:frame withCount:count];
    [self.view addSubview:rainbow];
    [rainbow release];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
